<html>
<body>
<p>This inspection warns about Optional call chains which could be simplified. Here are some examples of possible simplifications:</p>
<ul>
  <li><code>optional.map(x -> true).orElse(false)</code> &rarr; <code>optional.isPresent()</code></li>
  <li><code>optional.map(x -> Optional.of(x.trim())).orElseGet(Optional::empty)</code> &rarr; <code>optional.map(String::trim)</code></li>
  <li><code>optional.map(x -> (String)x).orElse(null)</code> &rarr; <code>(String) optional.orElse(null)</code></li>
</ul>
<!-- tooltip end -->
<p><small>New in 2017.2</small></p>
</body>
</html>